class Solution(object):
    def countPrimeSetBits(self, left, right):
        """
        :type left: int
        :type right: int
        :rtype: int
        """
        zhishu = {2, 3, 5, 7, 11, 13, 17, 19}
        t = 0
        for num in range(left, right + 1):
            count = 0
            while num > 0:
                num &= (num - 1)
                count += 1
            if count in zhishu:
                t += 1
        return t